package com.web.common.utils;

import com.dao.impl.EarthDaoImpl;
import com.dao.impl.UserDaoImpl;

/**
 * @Author wangzhipeng
 * @Date 2020-08-31 11:01 上午
 * @Description
 */
public class BeanFactory {
    public static final String USER_DAO = "userDao";
    public static final String EARTH_DAO = "earthDao";

    public static Object getBean(String name){
        if(name.equals(USER_DAO)){
            return new UserDaoImpl();
        }else if (name.equals(EARTH_DAO)){
            return new EarthDaoImpl();
        }
        else {
            return null;
        }
    }
}
